testsuite/gtk/singleselection.c: Avoid VLA usage
authorChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 21 Feb 2019 02:37:27 +0000 (10:37 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 21 Feb 2019 02:37:27 +0000 (10:37 +0800)
It is unfortunate that Visual Studio is unlikely to support VLA usage,
so replace it with g_newa().

testsuite/gtk/singleselection.c

index 165ea5a41358223e97eb5d85de7623d51d1b1c8e..4b7280fbbc976450925e9f7b490482708b517781 100644 (file)
@@ -97,7 +97,7 @@ splice (GListStore *store,
         guint      *numbers,
         guint       added)
 {
-  GObject *objects[added];
+  GObject **objects = g_newa (GObject *, added);
   guint i;
 
   for (i = 0; i < added; i++)